The present invention relates to an image processing method and device, more specifically to an image processing method and device for generating the fog effect.
In the field of the computer graphics the fog effect generating art for generating in images fog and mist of vapor, and fog of, e.g., smoke, dust, etc., is noted for the purpose of providing more realistic images.
The conventional fog effect generating technique will be explained. In the conventional fog effect generating technique, when fog is generated, a distance between a view point and a point on a polygon is computed, and based on the distance, a fog density at the point is set. For example, when a distance between a view point and a point on the polygon is large, a fog density corresponding to the point on the polygon is made higher, and when a distance between a view point and a point on a polygon is small, a fog density corresponding to the point on the polygon is made low.
However, according to such conventional fog effect generating technique, higher fog densities are provided as a distance from a view point increases. Accordingly, it is impossible to provide realistic images in which, for example, fog is dense near the ground and is thinner upward.
Furthermore, according to the conventional fog effect generating technique, when varying a fog density, the variation of the fog density is uniform. It is impossible to provide realistic images in which fog is hazy.
An object of the present invention is to provide an image processing method and device which can provide realistic images.
The above-described object is achieved by an image processing method for fogging an object in a three-dimensional space, which is observed at a view point, a fog density of the object observed at the view point being computed based on a distance between a fog base plane set in the three-dimensional space and the object.
Fog densities are set corresponding to densities between a fog base plane and an object, whereby realistic images that dense fog hangs over the ground can be provided.
The above-described object is achieved by an image processing method for fogging an object in a three-dimensional space, which is observed at a view point, a fog density of the object observed at the view point being computed based on a distance between a fog base plane set in the three-dimensional space and the object and on a distance between the view point and the object.
Even when objects are spaced equidistantly from a fog base plane, a lower fog density is given for that of the objects which is nearer of the objects, and a higher fog density is given to that of the objects which is remote. Realistic images can be provided.
In the above-described image processing method it is preferable that for an object belonging to one side of the fog base plane, the fog density thereof is computed by a first function and, for an object belonging to the other side of the fog base plane, the fog density thereof is computed by a second function which is different from the first function. More realistic images can be provided.
In the above-described image processing method it is preferable that the fog density is varied at random to perform haze processing. Haze states can be expressed. Realistic images can be provided.
In the above-described image processing method it is preferable that a plurality of the fog base planes are provided, and the fog densities given with respect to said plurality of the fog base planes are synthesized with each other. More realistic images can be provided.
The above-described object is achieved by an image processing device for fogging an object in a three-dimensional space, which is observed at a view point, comprising fog density computing means for computing a fog density of the object observed at the view point, based on a distance between a fog base plane set in the three-dimensional space and the object.
Fog densities are set corresponding to densities between a fog base plane and an object, whereby realistic images that dense fog hangs over the ground can be provided.
The above-described object is achieved by an image processing device for fogging an object in a three-dimensional space, which is observed at a view point, comprising fog density computing means for computing a fog density of the object observed at the view point, based on a distance between a fog base plane set in the three-dimensional space and the object and on a distance between the view point and the object.
Even when objects are spaced equidistantly from a fog base plane, a lower fog density is given for that of the objects which is nearer of the objects, and a higher fog density is given to that of the objects which is remote. Realistic images can be provided.
In the above-described image processing device it is preferable that the fog density computing means, for an object belonging to one side of the fog base plane, computes the fog density thereof by a first function and, for an object belonging to the other side of the fog base plane, computes the fog density thereof by a second function which is different form the first function. More realistic images can be provided.
In the above-described image processing device it is preferable that haze processing unit for varying the fog density at random to perform haze processing. Hazy states can be expressed. Realistic images can be provided.
In the above-described image processing device it is preferable that a plurality of the fog base planes are provided, and the fog density computing means synthesizes the fog densities given with respect to said plurality of fog base planes. More realistic images can be provided.